package com.zink.ezequiel.codes.data.model;

import com.desandroid.framework.ada.Entity;
import com.desandroid.framework.ada.annotations.Table;
import com.desandroid.framework.ada.annotations.TableField;

@Table(name = "tEntry")
public class Entry extends Entity {

    public Entry(String entryName, String userName, String userPassword,
			String url, String note, Tag tag) {
		super();
		this.entryName = entryName;
		this.userName = userName;
		this.userPassword = userPassword;
		this.url = url;
		this.note = note;
		this.tag = tag;
	}

	@TableField(name = "entryName", datatype = Entity.DATATYPE_STRING)
    private String entryName;

    @TableField(name = "userName", datatype = Entity.DATATYPE_STRING)
    private String userName;

    @TableField(name = "userPassword", datatype = Entity.DATATYPE_STRING)
    private String userPassword;

    @TableField(name = "url", datatype = Entity.DATATYPE_STRING)
    private String url;

    @TableField(name = "note", datatype = Entity.DATATYPE_STRING)
    private String note;
    
    @TableField(name = "tag", datatype = Entity.DATATYPE_ENTITY_REFERENCE)
    private Tag tag;
    
    public Entry() {
    }

	public String getEntryName() {
		return entryName;
	}

	public void setEntryName(String entryName) {
		this.entryName = entryName;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserPassword() {
		return userPassword;
	}

	public void setUserPassword(String userPassword) {
		this.userPassword = userPassword;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public Tag getTag() {
		return tag;
	}

	public void setTag(Tag tag) {
		this.tag = tag;
	}

	@Override
	public String toString() {
		return entryName + ", user:" + userName;
	}
}
